#include "n32g020xx.h"
#include "n32g020xx_common.h"
#include "n32g020xx_log.h"
#include <string.h>
#include "cmsis_os.h"

#define APPLICATION_TASK_STK_SIZE           1024
extern void application_entry(void *arg);
osThreadDef(application_entry, osPriorityNormal, 1, APPLICATION_TASK_STK_SIZE);


void application_entry(void *arg)
{
    while (1) {
        printf("This is a demo task,please use your task entry!\r\n");
        tos_task_delay(1000);
    }
}

int main(void)
{
    log_init();
    log("Sys StartUp.\r\n");
    printf("Welcome to TobudOS!\r\n");
    osKernelInitialize();
    osThreadCreate(osThread(application_entry), NULL);
    osKernelStart();
}

